/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package exemple;

import java.rmi.Naming;
import java.rmi.RemoteException;
import java.util.List;

/**
 *
 * @author jfdenise
 */
public class Client {

    /**
     * @param args the command line arguments
     */
//    public static void main(String[] args) {
//        try {
//            Hello obj = (Hello) Naming.lookup("//localhost/HelloServer");
//            String msg = "Bananaaaaaaa";
//            String message = obj.sayHello(msg);
//            System.out.println("Received Message " + message);
//        } catch (Exception e) {
//            System.out.println("Client exception: " + e.getMessage());
//            e.printStackTrace();
//        }
//    }
     public static void main(String[] args) {
        try {
            Service obj = (Service) Naming.lookup("//localhost/HelloServer");
            //String msg = "Bananaaaaaaa";
            List<ProcessusBean> listProcess = obj.getListProcessus();
            for (ProcessusBean p : listProcess){
                System.out.println(p);
            }
            SystemInformationBean systemInfo = obj.getSystemInformation();
            System.out.println(systemInfo);
            //System.out.println("Received Message " + message);
        } catch (Exception e) {
            System.out.println("Client exception: " + e.getMessage());
            e.printStackTrace();
        }
    }
}
